<?
  include('../init.php');

  $product_id= $_GET["aid"];
  
  $db->execute("DELETE FROM products WHERE product_id = '$product_id'");
  
  if(file_exists('../../images/products/'.$product_id)){
    remove_dir('../../images/products/'.$product_id);
  }

  header("Location:product_list.php?aid=".$_GET["setid"]);
?>